package com.pcbly.web.business;

import java.io.Serializable;
import java.util.HashMap;
import java.util.List;

import com.pcbly.web.components.hibernate.support.Page;




public interface BaseService<T> {
	void clear()throws Exception;

	void evit(Object entity) throws Exception;

	List<T> find(String hql, Object... values) throws Exception;

	List<T> findBy(String propertyName, Object value, String orderBy,
			boolean isAsc) throws Exception;

	List<T> findBy(String propertyName, Object value) throws Exception;

	T get(Serializable id) throws Exception;

	List<T> getAll() throws Exception;

	List<T> getAll(Class<T> entityClass) throws Exception;

	List<T> getAll(Class<T> entityClass, String orderBy, boolean isAsc) throws Exception;

	List<T> getAll(String orderBy, boolean isAsc) throws Exception;

	String getIdName(Class<T> clazz) throws Exception;

	Page<T> pagedQuery(String hql, int pageNo, int pageSize, Object... values) throws Exception;

	void remove(Object o) throws Exception;

	void removeById(Class<T> entityClass, Serializable id) throws Exception;

	void removeById(Serializable id) throws Exception;
	List<HashMap<String, String>> findCommnonDataBeanExt(String tableName,
			String id) throws Exception;
	void saveObject(Object o) throws Exception;
}
